package com.alameda.provider.user;

import com.alameda.service.user.AdUserService;
import com.alameda.user.api.AdUserProvider;
import com.alameda.user.dto.AdUserDTO;
import com.alameda.user.vo.AdUserVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 用户 同步接口层 具体实现
 *
 * @author Lv
 * @date 2024/06/02
 */
@DubboService
public class AdUserProviderImpl implements AdUserProvider {

    @Autowired
    private AdUserService adUserService;

    /**
     * 查询用户列表
     *
     * @param adUserDTO 用户信息
     * @return
     */
    @Override
    public IPage<AdUserVO> loadUser(AdUserDTO adUserDTO) {
        return adUserService.loadUser(adUserDTO);
    }

    /**
     * 处理管理端token续期
     *
     * @param token 登录令牌
     * @return
     */
    @Override
    public Boolean dealAdUserTokenRenewal(String token) {
        return adUserService.dealAdUserTokenRenewal(token);
    }

}
